<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=9" />
<title>分享详细</title>

<script src="jquery/js/jquery-1.8.2.js"></script>
<script src="jquery/js/jquery-ui-1.9.0.custom.min.js"></script>
<link rel="stylesheet" href="jquery/css/ui-lightness/jquery-ui-1.9.0.custom.min.css" />

<link rel="stylesheet" href="css/jPages.css" />
<link href="css/xixiaoming/paticipateDetail.css" rel="stylesheet">
<link href="css/participate.css" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="css/login.css" />
<link rel="stylesheet" type="text/css" href="fancybox/jquery.fancybox-1.3.4.css" />

<script type="text/javascript" src="js/myCustonAndShoppingCar/lightbox/js/lightbox.js"></script>
<link rel="stylesheet" type="text/css" href="js/myCustonAndShoppingCar/lightbox/css/lightbox.css" />

<script type="text/javascript" src="js/myCustonAndShoppingCar/participateDetail.js"></script>
<script type="text/javascript" src="js/customjs/custom.js"></script>
<script type="text/javascript" src="js/bgjs/js/script.js"></script>
<script type="text/javascript" src="js/myCustonAndShoppingCar/jPages.js"></script>
<script type="text/javascript" src="js/myCustonAndShoppingCar/participate.js"></script>

<script type="text/javascript" src="js/myCustonAndShoppingCar/bgiframe.js"></script>
<script type="text/javascript" src="js/myCustonAndShoppingCar/weebox.js"></script>
<link type="text/css" rel="stylesheet" href="css/xixiaoming/weebox.css" />

<script type="text/javascript">
	$(document).ready(function(){
		jPagesresign("itemContainerr","#bottom111");
		jPagesresign("itemContainer1", "#itemContainer1234");
		jPagesresign("itemContainer", "#itemContainer123");
		//top头部的预加载数据
		$("#user_dingzhi").mouseover(function () {
	        $("#productList").show();
	        $("#productullist").show();
	    });
		$("#pictureDetail").mouseout(function () {
			var event = arguments[0]||window.event;
	        if(!this.contains(event.toElement || event.relatedTarget)){
				$("#pictureDetail").slideUp('slow');
			}
	    });
		$("#productList").mouseleave(function () {
	        $("#productullist").hide();
	    });
		//---------------------------------------------------
		$("#uploaddiypicture").dialog({
			autoOpen:false
		});
		$("#jubao").dialog({
			autoOpen : false,
			module : true,
			hide : "fadeout",
			modal : true,
			title : "举报",
			width:400,
			height:200,
			position:[$("#itemContainerr").offset().left,$("#itemContainerr").offset().top]
		});
		$.getJSON("getLocalFont.action", function(data) {
			var fontfamilyselect = document.getElementById("fontfamilyselect");
			$.each(data.evnfont, function(index, value) {
				var o = document.createElement("option");
				o.innerHTML = value;
				fontfamilyselect.appendChild(o);
			});
			fontfamilyselect.value = "楷体";
		});
		// 初始化字体大小select
		var sizeselect = document.getElementById("sizeselect");
		for ( var i = 10; i <= 200; i = i + 5) {
			var o = document.createElement("option");
			o.innerHTML = i;
			sizeselect.appendChild(o);
		}
		// 限制字体大小的输入
		$("#fontsize").keyup(function() {
			var fontsizevalue = $("#fontsize").val();
			if (fontsizevalue != '') {
				if (fontsizevalue > 200) {
					alert("字体大小不能超过200！");
					$("#fontsize").val(fontsizevalue.substr(0,fontsizevalue.length - 1));
				} else if (!(/^[0-9]{1,3}$/.test(fontsizevalue))) {
					alert("请输入数字！");
					$("#fontsize").val(fontsizevalue.substr(0,fontsizevalue.length - 1));
				}
			}
		});
		// 滚动条事件
		window.onscroll = function() {
			if (finished&&(Math.abs(document.body.clientHeight
					- document.documentElement.clientHeight) == (document.documentElement.scrollTop || document.body.scrollTop))){
				finished=false;
				loadShareMsg();}
		};
	});
</script>
</head>

<body style="text-align:center;width:100%;margin :0px; padding: 0px;">
	<img src="img/022.gif" id="loading_img"
		style="display:none;position:absolute;z-index:999;" />
	<div id="fancybox-overlay"
		style="background-color: rgb(119, 119, 119); height: 1823px;
		opacity: 0.7; cursor: pointer; display: none; "
		onclick="viewclose()"></div>
	<div id="paintBody"
		style="position:absolute;z-index:1101;display: none; width: 630px; top: 100px; left: 431px; height: auto">
		<div id="wPaint"
			style="position:relative; width:500px; height:300px; background:#CACACA; border:solid black 1px; overflow:hidden;">
		</div>
		<br />
		<div style="float:left;margin-left:50px">
			<input type="button" value="确定" onClick="saveImage()"
				style="border:0;background-color:#94b8e9" /> <input type="button"
				value="清空" onClick="clearCanvas()"
				style="border:0;background-color:#94b8e9" />
		</div>
	</div>

	<div id="fancybox-wrap"
		style="display: none; width: 630px; top: 88px; left: 431px; height: auto; ">
		<div id="fancybox-outer">
			<div class="fancybox-bg" id="fancybox-bg-n"></div>
			<div class="fancybox-bg" id="fancybox-bg-ne"></div>
			<div class="fancybox-bg" id="fancybox-bg-e"></div>
			<div class="fancybox-bg" id="fancybox-bg-se"></div>
			<div class="fancybox-bg" id="fancybox-bg-s"></div>
			<div class="fancybox-bg" id="fancybox-bg-sw"></div>
			<div class="fancybox-bg" id="fancybox-bg-w"></div>
			<div class="fancybox-bg" id="fancybox-bg-nw"></div>
			<div id="fancybox-content"
				style="width: 610px; height: 480px; border-top-width: 10px;
				border-right-width: 10px; border-bottom-width: 10px; border-left-width: 10px; ">
				<img id="fancybox-img" src="" alt="">
			</div>
			<a id="fancybox-close" style="display: block; " onClick="viewclose()"></a>
			<a href="javascript:;" id="fancybox-left" style="display: none; ">
				<span class="fancy-ico" id="fancybox-left-ico"></span> </a> <a
				href="javascript:;" id="fancybox-right" style="display: none; ">
				<span class="fancy-ico" id="fancybox-right-ico"></span> </a>
			<div id="fancybox-title" class="" style="display: none; "></div>
			<br /> <input type="button" value="保存到购物车"
				style="border-style:dashed;font-size:15" onClick="getCustomName()" />
			&nbsp;&nbsp;&nbsp;&nbsp; <input type="button" value="直接付款"
				style="border-style:dashed;font-size:15" onClick="payForCustom()" />
		</div>
	</div>

	<jsp:include page="top.jsp"></jsp:include>
	<div style="width:1100px;height:50px;"></div>
	<div id="contentBody" style="width:970px;margin:0 auto;">
		<div class="shareinfo_content_left">
			<div id="outside" class="shareinfo_content_left_productioninfo">
				<div id="topdiv" style="height:510px;">
					<div id="example"
						style="height:510px;width:630px;left:191px;">
						<img alt="" src="${participate.orderPic}" width=630px height=510px />
					</div>
					<img id="openchexing" onclick="$('#leftlist').slideDown('slow');$('#openchexing').hide();" src="img/chexing.png" style="display:none;position:absolute;top:0px;left:-20px;">
					<img id="opengongju" onclick="$('#tooltip').slideDown('slow');$('#opengongju').hide();" src="img/gongju.png" style="display:none;position:absolute;top:412px;left:641px;">
					<div id="productpic" style="background-color:white;display:none;height:510px;width:630px;position:absolute;top:0px;"></div>
					<div id="bg" style="height:480px;width:640px;left:191px;border:1px solid #A8D9E9;display:none;">
						<div id="img0" style="display:none"></div>
						<div id="img1" style="display:none"></div>
						<div id="img2" style="display:none"></div>
						<div id="img3" style="display:none"></div>
						<div id="img4" style="display:none"></div>
						<div id="img5" style="display:none"></div>
						<div id="img6" style="display:none"></div>
						<div id="img7" style="display:none"></div>
						<div id="img8" style="display:none"></div>
						<div id="img9" style="display:none"></div>
					</div>
				</div>
				<c:if test="${not empty participate.picList}">
				<div style="height:auto;margin-left:10px;clear:both;width:750px;top:600px;" id="selectMore">
					<ul id="example1">
						<c:forEach items="${participate.picList }" var="bg">
							<li><img height="107" width="107"
								onclick="changeShowPic('${bg.orderPic}');" src="${bg.orderPic}">
							</li>
						</c:forEach>
					</ul>
				</div></c:if>
				<div class="shareinfo_content_left_productionshare">
					<div class="shareinfo_content_left_productionshare_dingzhi">
						<a id="mydingzhi" href="javascript:redesign();"><b>我也定制</b> </a>
					</div>
					<div class="shareinfo_content_left_productionshare_dingzhi">
						<c:if test="${participate.type=='o'}">
							<a href="showShoppingCar?ordersId=${participate.id}" target="_blank"><b>立刻购买</b> </a>
						</c:if>
						<c:if test="${participate.type=='c'}">
							<a href="showShoppingCar?customId=${participate.id}" target="_blank"><b>立刻购买</b> </a>
						</c:if>
					</div>
					<div class="shareinfo_content_left_productionshare_dingzhi">
						<c:choose>
							<c:when test="${empty participate.cdr}">
								<a style="disabled:true"><b>没有cdr文件</b></a>
							</c:when>
							<c:otherwise>
								<a href="downloadFile?fileName=${participate.cdr}"><b>下载CDR文件</b> </a>
							</c:otherwise>
						</c:choose>

					</div>
					<div style="float:right;height:20px;margin-right:1px;text-align:center;" onclick="clickShareOut(${id},'${type}');">
						<div class="jiathis_style_24x24">
							<a class="jiathis_button_qzone"></a>
							<a class="jiathis_button_tqq"></a>
							<a class="jiathis_button_tsina"></a>
							<a href="http://www.jiathis.com/share"
								class="jiathis jiathis_txt jtico jtico_jiathis" target="_blank"></a>
							<a class="jiathis_counter_style"></a>
						</div>
						<script type="text/javascript"
							src="http://v3.jiathis.com/code/jia.js?uid=1356769700443407"
							charset="utf-8"></script>
					</div>
				</div>
				<div style="text-align:left;float:left;height:auto;overflow-y:auto;width:640px">
					${participate.theme}
				</div>
				<div>
				<img alt="" src="images/bg.png" style="float:left;margin:0 0 10px 20px;">
				<form target="upload_target" method="post" name="plform" id="plform" enctype="multipart/form-data" action="insertIntoComment.action">
					<input type="hidden" value="${participate.id}" name="id"/>
					<input type="hidden" value="${participate.type}" name="type"/>
					<div class="post_box_cont" style="zoom:1">
						<textarea name="comment" id="inputcontent"
							style="background-color: rgb(255, 255, 255);width:580px; "></textarea>
					</div>
					<div style="text-align:right;margin-top:10px;">
						<input type="button" value="上传图片或文件" onclick="showUpload(this);$(this).remove();"/>
						<input type="button" value="发布" onclick="sendCommentAtDetail('${participate.id}','${participate.type}')"/>
					</div><iframe name="upload_target" style="display:none" id="upload_target"></iframe></form>
				</div>

				<div id="leftSelectDiv"
					style="top:0px;display:none;width:0px;position:absolute;z-index:900;padding:0px;outline:0;border:0px solid #a0b3d6;word-wrap:break-word;float:left;text-align:left;left:-149px;">
					<div id="leftlist"
						style="width:148px;position:relative;border-color:#A8D9E9;border-style:solid;border-width:1px;">
						<%-- <div id="typeSelect">
							<img src="img/chexing1.png" onclick="hideTypeSelect()"/>
							<div style="height:460px;overflow-y: auto;width:148px;">
								<ul style="list-style:none;padding:0px;margin:0px;margin-left:20px;">
									<c:forEach items="${typelist}" var="fli">
										<li><a href="javascript:void(0);" id="${fli.brandsId}"
											onclick="zhan1(${fli.brandsId})"><img
												id="tupian${fli.brandsId}" src="img/nolines_plus.gif">
										</a> ${fli.brandsName}
											<div id="second${fli.brandsId}" style="display:none" isclick="false">
												<ul id="uu${fli.brandsId}"></ul>
											</div>
										</li>
									</c:forEach>
								</ul>
							</div>
						</div> --%>
					<div id="typeSelect">
						<img src="img/chexing1.png" onclick="hideTypeSelect()" />
						<div style="height: 460px; overflow-y: auto; width: 148px;">
							<table width="100%">
								<c:forEach items="${typelist}" var="fli">
									<tr><td width="16%">
										<%-- <a href="javascript:void(0);" id="${fli.brandsId}" onclick="zhan1(${fli.brandsId})">
											<img id="tupian${fli.brandsId}" src="img/nolines_plus.gif" />
										</a> --%>
										<img style="cursor:pointer;" id="tupian${fli.brandsId}" onclick="zhan1(${fli.brandsId})" src="img/nolines_plus.gif" />
										</td><td>
										<a onclick="zhan1(${fli.brandsId})" href="javascript:void(0);" style="color:black;font-size:11px;font-family:微软雅黑;">${fli.brandsName}</a></td></tr><tr><td colspan="2">
										<div id="second${fli.brandsId}" style="display: none;" isclick="false">
											<ul id="uu${fli.brandsId}"></ul>
										</div></td>
									</tr>
								</c:forEach>
							</table>
						</div>
					</div>
					</div>
				</div>
				<div id="tooltip"
					style="top:0px;display:none;clear: both; position: absolute; float: left; left: 641px;">

					<div id="custom_choose"
						style="margin:0px;padding:0px;width:148px;position:relative;height:480px;border-color:#A8D9E9;border-style:solid;border-width:1px;">
						<img src="img/custom_type.gif" onclick="$('#tooltip').slideUp('slow');$('#opengongju').show();" style="border:0px;padding:0px;margin:0px;"/>
						<img src="img/tuan.png" onclick="showUpload1()" style="border:0px;padding:0px;margin-top:-3px;width:148px;height:20px;"/>
						<div id="Carpic" style="height:339px;overflow-y: auto">
							<img src="img/a.png" class="diypic"
								onclick="addimg('img/a.png')" /> <img
								src="img/b.png" class="diypic"
								onclick="addimg('img/b.png')" /> <img
								src="img/c.png" class="diypic"
								onclick="addimg('img/c.png')" /> <img
								src="img/d.png" class="diypic"
								onclick="addimg('img/d.png')" /><img
								src="img/e.png" class="diypic"
								onclick="addimg('img/e.png')" />
						</div>
						<form id="addword" method="post">
						<div style="float:left;width:40px;">
								<div onClick="coloropen(event)" id="custom_color"
									style="width:40px;height:15px;cursor:pointer;border:1px solid #000;
					float:right;margin-top:4px;">
								<table id="tabletable" style="width:40px;height:15px;"><tr>
								<td style="background:black;">
								</td><td style="background:grey;">
								</td><td style="background:white;">
								</td></tr></table>
								</div>
								<div id="colorpane"
									style="position:absolute;z-index:999;display:none;"></div>
								<input type="hidden" name="color" value="rgb(0, 0, 0)" />
							</div>

							<select id="fontfamilyselect" name="family" style="width:55px;height:20px"></select>

							<select onChange="changeSelectSize(this.value)" id="sizeselect"
								style="float:right;width:50px;height:20px">
							</select>
							<input type="text" name="size" id="fontsize" value="88"
									onblur="javascript:if(this.value==''){alert('请选择字体大小！');this.value='88';}"
									style="width:35px;height:20px;position:relative;top:-20px;left:22px;" />
							<textarea name="word" id="word"
								style="width:140px;height:40px;margin-top:-16px;font-size:12px;resize:none;color:#8a8a8a;" onfocus="inputWordFocus()">请输入自定义文字</textarea>
							<input type="button"
								style="float:left;border:0;background-color:transparent;background-image:url(img/wordqueding.png);width:148px;height:20px;" value=""
								onclick="checkaddword()" /> </form>
						<div id="uploaddiypicture">
							<form action="picupload.action" id="form1" name="form1"
								encType="multipart/form-data" method="post" target="hidden_frame"
								style="text-align:left;font-size:14px;">
								<input type="text" id="txt" name="txt"
									style="position:relative;left:0px;width:140px;top:5px;height:24px;border:0;"
									value="点击此处选择图片" /> <input type="file" id="file"
									onchange="txt.value=this.value" name="myfile" size="17px"
									style="width:200px;height:24px;position:relative;left:0;top:-19px;filter:alpha(opacity=0);-moz-opacity:0;opacity:0;" />
								<input type="submit" value="上传"
									onmouseover="this.style.borderColor='#75cd02';"
									onmouseout="this.style.borderColor='#dcdcdc';" class="button1"
									style="position:relative;left:133px;width:65px;top:-43px;height:24px" />
								<iframe name='hidden_frame' id="hidden_frame"
									style="display:none;"></iframe>
							</form>
						</div>
						<script type="text/javascript">
							function callback() {
								document.getElementById("file").outerHTML = document.getElementById("file").outerHTML;
							}
						</script>
						<img src="img/shoppingcar.png"
							style="width:148px;height:20px;cursor:pointer;"
							onclick="yulan()" />
						</div>
				</div>

			</div>
			<div class="shareinfo_content_left_usercomment">
				<div class="c_title">
					<span class="cmenu">最新评论</span> <a href="javascript:;"
						class="cmnt-reflash-btn" onclick="refreshComm(${id},'${type}')">刷新</a>
				</div>
				<div id="itemContainerr" style="min-height: 144px;">
					<c:forEach items="${participate.clist}" var="c">
						<div class="shareinfo_content_left_usercomment_child"
							style="display:block;">
							<div>
								<div style="float:left">
									<img src="${c.userFace}" width="50px" height="50px" onclick="getUserMessage('${c.userName}');"/>
								</div>
								<div style="float:left;margin-left:10px;text-align:left;width:520px;">
									<font color=#666>${c.userName}</font><br />
									<c:if test="${not empty c.commPic}">
										<a href="${c.commPic}" rel="lightbox"><img src="${c.commPic}" style="height:130px;width:auto;"/></a>
									</c:if>
									${c.commentContent}
									<c:if test="${not empty c.filePath}">
										<img onclick="window.location.href='downloadFile1?path=${c.filePath}&&filename=${c.fileName}'" src="images/xiazai.png" title='下载设计图片' style="width:22px;height:22px;cursor:pointer;"/>
									</c:if>
								</div>
							</div>
							<div style="clear:both;margin-top:12px;text-align:left">
								<font style="margin-left:50px;">${c.commentTime_bak}</font>
								<a href="javascript:reportSomebody(${c.commentId})" style="float:right;">举报</a>
							</div>
							<hr />
						</div>
					</c:forEach>
				</div>
				<div id="bottom111" class="holder"></div>
			</div>
		</div>
		<jsp:include page="rankContent.jsp"></jsp:include>
		<div style="margin-left:-100px;">
			<div style="float:left;margin-left:100px;text-align:left;width:600px;"><h2>其他分享：</h2></div>
			<jsp:include page="shareContent.jsp"></jsp:include>
		</div>
	</div>
	<div style="text-align:right;clear:both;margin:0 auto;width:600px;height:30px;" id="bottomtip">
		<font style="color:green;font-family:'楷体';font-size:20"></font>
	</div>
	<jsp:include page="bottom.jsp"></jsp:include>
	<!-- 保存设计信息弹出层 -->
	<div id="inputdesignmsg" style ="display:none;background-color : #fff; overflow: hidden ;">
		<fieldset style="font-family:'微软雅黑';font-size:13px;text-align:left;"><table align="center" style ="width : 100%">
			<tr align="center"><td>请给你的设计取个名字：</td></tr>
			<tr align="center"><td><input type="text" id="inputcustomname" class="text ui-widget-content ui-corner-all" value="${customname }" /></td></tr>
			<tr align="center"><td>您也可以给您的设计添加备注：</td></tr>
			<tr align="center"><td><input type="text" id="inputcustomcontent" class="text ui-widget-content ui-corner-all"
				value="${customcontent}" /></td></tr>
		</table></fieldset>
		<input type="button" onClick="inputCustomMsgButton()" value="确定"
			class="btn_queding" />
	</div>
	<!-- 举报弹出层 -->
	<div id="jubao" style ="display:none;background-color : #fff; overflow: hidden ;">
		请写出举报理由：
		<textarea cols="40" rows="3" id="reportReason" style ="width : 100%"></textarea>
		<input type="button" value="确定举报" onclick="reportClick()" />
	</div>
	<!-- hidden隐藏区 -->
	<input type="hidden" value="${sharelength}" id="hiddenhasdata" />
	<input type="hidden" value="${id}" id="hiddenid" />
	<input type="hidden" value="${type}" id="hiddentype" />
	<input type="hidden" value="" id="hiddenpicdetaillistsize" />
	<input type="hidden" id="xxoo" value="">
	<input type="hidden" value="${productid}" id="hiddenproductid"/>
	<input type="hidden" value="0" id="hiddenflagshare"/>
</body>
</html>
